/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.webhomesites.padrao.utils;

/**
 *
 * @author Webhome
 */
public class DocumentFilterFactory {
    public static final int SO_NUMEROS = 0;  
   public static final int SO_LETRAS = 1;
   public static final int ENDERECO = 2;
     
   public static DocumentFilterComER criar(int tipo){  
      switch (tipo) {  
      case SO_NUMEROS:  
         return new DocumentFilterComER("[^0-9]");           
      case SO_LETRAS:  
         return new DocumentFilterComER("[^A-Z ]");
      case ENDERECO:  
         return new DocumentFilterComER("[^A-Z \\-,1-9]");
      default:  
         return new DocumentFilterComER("");           
      }     
   }  
   public static DocumentFilterComER criar(String er){  
      return new DocumentFilterComER(er);     
   } 
    
}
